home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / CDTools / GoFetch! / arexx / Mike_Cardwell / YAMtoGoFetch.rexx
OS/2 REXX Batch file  |  1999-09-02  |  2KB  |  63 lines

  1.  
  2. /*$VER: Yam-GoFetch v1.0 by Mike Cardwell <mickeyc@ukonline.co.uk> (04/11/99)
  3.  
  4. **
  5. To integrate with YAM.
  6. 1.) Go to Configuration in the Settings menu.
  7. 2.) Select "ARexx"
  8. 3.) Scroll to the bottom, and click on "When double-clicking an url"
  9. 4.) Select Arexx from the pull down menu.
  10. 5.) Type in the full path of Yam-GoFetch (Including the filename)
  11. 6.) Both tick boxes want to be unselected
  12. 7.) Fill in requested information below
  13.  
  14. Now. When double clicking an ftp:// url, the download information will
  15. be sent to GoFetch. It will only work with URL's ending with a filename.
  16.  
  17. ** ENTER USER INFORMATION BELOW **
  18. **
  19.  
  20. ********************************/
  21.  userid="anonymous"                /* Username to log in  */
  22.  pass  ="usually@email.address"    /* Password to log in  */
  23.  local ="Ram:"                     /* Path to download to */
  24.  path  ="DH1:GoFetch!/GoFetch!"    /* Path of GoFetch     */
  25. /*******************************
  26.  
  27.  LEAVE THE SCRIPT BELOW ALONE UNLESS YOU KNOW WHAT YOU'RE DOING */
  28.  
  29. /* Check to see if correct url */
  30.  
  31. OPTIONS RESULTS
  32. PARSE ARG url
  33. url=STRIP(url)
  34. IF INDEX(url,"ftp://")=0 THEN EXIT
  35.  
  36. /* Loads GoFetch if not already open */
  37.  
  38. IF SHOW(P,GOFETCH)=0 THEN DO
  39.  ADDRESS COMMAND'Run >nil: 'path
  40.  DO UNTIL SHOW(P,GOFETCH)=1
  41.   ADDRESS COMMAND"Wait 1"
  42.  END
  43. END
  44.  
  45. /* Seperates site, directory, and filename */
  46.  
  47. url=RIGHT(url,LENGTH(url)-7)
  48. a=POS("/",url)
  49. site=LEFT(url,a-1)
  50. a=LASTPOS("/",url)
  51. file=RIGHT(url,LENGTH(url)-a)
  52. file=LEFT(file,LENGTH(file)-1)
  53. dir=LEFT(url,LENGTH(url)-LENGTH(file)-1)
  54. dir=RIGHT(dir,LENGTH(dir)-LENGTH(site))
  55.  
  56. /* Sends information to GoFetch */
  57.  
  58. ADDRESS GOFETCH
  59. 'ADDPROFILE 'site' 21 'userid' 'pass' 'dir' 'file' 'local
  60.  
  61.  
  62.  
  63.